#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>

int main()
{
    const char*fstr="hello fwrite\n";
    //const char*fstr="hello fwrite";
    const char*str="hello write\n";
    //const char*str="hello write";
    printf("hello printf\n");   //stdout->1
    sleep(2);
    fprintf(stdout,"hello fprintf\n"); //stdout->1
    sleep(2);
    fwrite(fstr,strlen(fstr),1,stdout);//fread stdout->1
    sleep(2);
    write(1,str,strlen(str));    
    sleep(5);
    //close(1);
    fork();
    return 0;
}

//int main()
//{
//    printf("hello linux");
//    close(1);
//    return 0;
//}
